function y = imagermse(A,B)
    %should check for datatype and uniformity of size
    diffmatrix = double(A)-double(B);
    diffmatrix = diffmatrix.^2;
    sumofcoeff = sum(diffmatrix(:));
    sumofcoeff = sumofcoeff / numel(sumofcoeff);
    y = sqrt(sumofcoeff);
return